# Pushes all 'adjunct*' packages in the Adjunct.Server\Packages folder.
 
$nuget = Get-Item '..\Adjunct.Build\tools\NuGet.1.5.exe'
$packagesDir = Get-Item '..\..\Server\Adjunct.SimpleServer\Packages'
$apiKey = $apiKey = Get-Content apikey.txt
$counter = 0

# Push all extensions
Write-Output "Publishing"
foreach ($package in (Get-ChildItem $packagesDir -Include adjunct*.nupkg -Recurse))
{
	$counter++
	Write-Output "$counter) uploading $package"
	&($nuget.FullName) push -source http://packages.nuget.org/v1/ $package.FullName $apiKey
}

Write-Output "Publishing Complete"
Read-Host